﻿@using System.Data;
@using ZoomLa.Common
@using ZoomLa.BLL.Helper
@model ZoomLa.SQLDAL.SQL.PageSetting
@functions{
    public string GetUrl(DataRow dr)
    {
        return "/Page/PageContent?ItemID=" + dr["GeneralID"];
    }
    public MvcHtmlString GetTitle(DataRow dr)
    {
        string html = "";
        html = "<a href=\"EditContent?ID=" + dr["GeneralID"] + "\" title='修改内容'>" + dr["Title"] + "</a>";
        return MvcHtmlString.Create(html);
    }
}
@{
    Model.cols = 8;
}
<div id="EGV">
        <table class="table table-striped table-bordered table-hover content_list">
            <tr>
                <td class="td_xs"></td><td>ID</td><td>所属模型</td><td>标题</td><td>发布者</td><td>创建时间</td><td>状态</td><td>操作</td>
            </tr>
            @foreach(DataRow dr in Model.dt.Rows)
            {
                <tr>
                <td><input type="checkbox" name="idchk" value='@dr["GeneralID"]' /></td>
                <td>@dr["GeneralID"]</td>
                <td><a href="PageContent.aspx?ModelID=@dr["ModelID"]" title="按模型筛选">@(dr["ModelName"])[@dr["ItemName"]]</a></td>
                <td>@GetTitle(dr)</td>
                <td><a href="javascript:;" onclick="user.showuinfo('@dr["UserID"]')">@dr["Inputer"]</a></td>
                <td>@dr["CreateTime"]</td>
                <td>@ZoomLa.BLL.B_Content.GetStatusStr(DataConverter.CLng(dr["Status"]))</td>
                <td>
                    <a href="@GetUrl(dr)" class="option_style" target="_blank" title="预览"><span class="fa fa-eye" title="预览"></span></a>
                    <a href="EditContent?ID=@dr["GeneralID"]" class="option_style"><i class="fa fa-pencil" title="修改"></i></a>
                    <a href="javascript:;" onclick="mvcpage.del({ ids: '@dr["GeneralID"]', url: 'content_del', confirm: '确定要移除吗' });" class="option_style"><i class="fa fa-trash-o" title="删除"></i> 删除</a>
                </td>
            </tr>
            }
            @Html.Partial("_page",Model)
        </table>
    </div>